package com.moonshineproject.plugin.actionscript.as3parser.vo
{
	[RemoteClass(alias="v1.MutatorVO")]
	public class MutatorVO extends MemberBase
	{
		public var setter:FunctionVO
		public var getter:FunctionVO

		override public function get typePackage():String
		{
			if (getter) return getter.typePackage;
			else if (setter && setter.parameters.length)
			{
				return ParameterVO(setter.parameters[0]).typePackage;
			}
			return null;
		}
		
		override public function get type():String
		{
			if (getter) return getter.type;
			else if (setter && setter.parameters.length)
			{
				return ParameterVO(setter.parameters[0]).type;
			} 
			return null;
		}

		public function MutatorVO()
		{
			super();
		}

		override public function toString():String
		{
			return name + ":" + type;
		}
	}
}